package com.sikaryofficial.backend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sikaryofficial.backend.domain.dto.resp.productactivity.ActivityDTO;
import com.sikaryofficial.backend.domain.dto.resp.productactivity.ActivityReserveDTO;
import com.sikaryofficial.backend.domain.entity.ActivityReserve;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 活动预约Mapper接口
 *
 * @author qinjinyuan
 * @date 2023-11-02
 */
public interface ActivityReserveMapper extends BaseMapper<ActivityReserve> {
    /**
     * 获取预约列表
     *
     * @param userId        用户id
     * @param reserveStatus 预约状态
     * @return 预约列表
     */
    IPage<ActivityReserveDTO> reserveList(Page<ActivityReserveDTO> customerPage, @Param("userId") Long userId, @Param("reserveStatus") Integer reserveStatus);

    /**
     * 获取获奖列表
     *
     * @param userId 用户id
     * @return 获奖列表
     */
    IPage<ActivityReserveDTO> awardsList(Page<ActivityReserveDTO> customerPage, @Param("userId") Long userId);

    /**
     * 根据活动ID，获取预约数量
     *
     * @param activityIds
     * @return
     */
    List<ActivityDTO> getReserveCountList(@Param("activityIds") List<Long> activityIds);
}
